3.165 \(\int \frac{\cos ^5(c+d x)}{(a+i a \tan (c+d x))^4} \, dx\)

Optimal. Leaf size=174 \[ -\frac{8 \sin ^7(c+d x)}{143 a^4 d}+\frac{168 \sin ^5(c+d x)}{715 a^4 d}-\frac{56 \sin ^3(c+d x)}{143 a^4 d}+\frac{56 \sin (c+d x)}{143 a^4 d}+\frac{16 i \cos ^7(c+d x)}{143 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac{9 i \cos ^5(c+d x)}{143 a d (a+i a \tan (c+d x))^3}+\frac{i \cos ^5(c+d x)}{13 d (a+i a \tan (c+d x))^4} \]

[Out]

(56*Sin[c + d*x])/(143*a^4*d) - (56*Sin[c + d*x]^3)/(143*a^4*d) + (168*Sin[c + d*x]^5)/(715*a^4*d) - (8*Sin[c
+ d*x]^7)/(143*a^4*d) + ((I/13)*Cos[c + d*x]^5)/(d*(a + I*a*Tan[c + d*x])^4) + (((9*I)/143)*Cos[c + d*x]^5)/(a
*d*(a + I*a*Tan[c + d*x])^3) + (((16*I)/143)*Cos[c + d*x]^7)/(d*(a^4 + I*a^4*Tan[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.158102, antiderivative size = 174, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {3502, 3500, 2633} \[ -\frac{8 \sin ^7(c+d x)}{143 a^4 d}+\frac{168 \sin ^5(c+d x)}{715 a^4 d}-\frac{56 \sin ^3(c+d x)}{143 a^4 d}+\frac{56 \sin (c+d x)}{143 a^4 d}+\frac{16 i \cos ^7(c+d x)}{143 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac{9 i \cos ^5(c+d x)}{143 a d (a+i a \tan (c+d x))^3}+\frac{i \cos ^5(c+d x)}{13 d (a+i a \tan (c+d x))^4} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^5/(a + I*a*Tan[c + d*x])^4,x]

[Out]

(56*Sin[c + d*x])/(143*a^4*d) - (56*Sin[c + d*x]^3)/(143*a^4*d) + (168*Sin[c + d*x]^5)/(715*a^4*d) - (8*Sin[c
+ d*x]^7)/(143*a^4*d) + ((I/13)*Cos[c + d*x]^5)/(d*(a + I*a*Tan[c + d*x])^4) + (((9*I)/143)*Cos[c + d*x]^5)/(a
*d*(a + I*a*Tan[c + d*x])^3) + (((16*I)/143)*Cos[c + d*x]^7)/(d*(a^4 + I*a^4*Tan[c + d*x]))

Rule 3502

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*(d
*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^n)/(b*f*(m + 2*n)), x] + Dist[Simplify[m + n]/(a*(m + 2*n)), Int[(d*Sec[
e + f*x])^m*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0] && NeQ[m + 2*n, 0] && IntegersQ[2*m, 2*n]

Rule 3500

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(2*d^2
*(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 1))/(b*f*(m + 2*n)), x] - Dist[(d^2*(m - 2))/(b^2*(m + 2*n
)), Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 2), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a
^2 + b^2, 0] && LtQ[n, -1] && ((ILtQ[n/2, 0] && IGtQ[m - 1/2, 0]) || EqQ[n, -2] || IGtQ[m + n, 0] || (Integers
Q[n, m + 1/2] && GtQ[2*m + n + 1, 0])) && IntegerQ[2*m]

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rubi steps

\begin{align*} \int \frac{\cos ^5(c+d x)}{(a+i a \tan (c+d x))^4} \, dx &=\frac{i \cos ^5(c+d x)}{13 d (a+i a \tan (c+d x))^4}+\frac{9 \int \frac{\cos ^5(c+d x)}{(a+i a \tan (c+d x))^3} \, dx}{13 a}\\ &=\frac{i \cos ^5(c+d x)}{13 d (a+i a \tan (c+d x))^4}+\frac{9 i \cos ^5(c+d x)}{143 a d (a+i a \tan (c+d x))^3}+\frac{72 \int \frac{\cos ^5(c+d x)}{(a+i a \tan (c+d x))^2} \, dx}{143 a^2}\\ &=\frac{i \cos ^5(c+d x)}{13 d (a+i a \tan (c+d x))^4}+\frac{9 i \cos ^5(c+d x)}{143 a d (a+i a \tan (c+d x))^3}+\frac{16 i \cos ^7(c+d x)}{143 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac{56 \int \cos ^7(c+d x) \, dx}{143 a^4}\\ &=\frac{i \cos ^5(c+d x)}{13 d (a+i a \tan (c+d x))^4}+\frac{9 i \cos ^5(c+d x)}{143 a d (a+i a \tan (c+d x))^3}+\frac{16 i \cos ^7(c+d x)}{143 d \left (a^4+i a^4 \tan (c+d x)\right )}-\frac{56 \operatorname{Subst}\left (\int \left (1-3 x^2+3 x^4-x^6\right ) \, dx,x,-\sin (c+d x)\right )}{143 a^4 d}\\ &=\frac{56 \sin (c+d x)}{143 a^4 d}-\frac{56 \sin ^3(c+d x)}{143 a^4 d}+\frac{168 \sin ^5(c+d x)}{715 a^4 d}-\frac{8 \sin ^7(c+d x)}{143 a^4 d}+\frac{i \cos ^5(c+d x)}{13 d (a+i a \tan (c+d x))^4}+\frac{9 i \cos ^5(c+d x)}{143 a d (a+i a \tan (c+d x))^3}+\frac{16 i \cos ^7(c+d x)}{143 d \left (a^4+i a^4 \tan (c+d x)\right )}\\ \end{align*}

Mathematica [A]  time = 0.79145, size = 139, normalized size = 0.8 \[ -\frac{i \sec ^4(c+d x) (-6006 i \sin (c+d x)-25740 i \sin (3 (c+d x))+14300 i \sin (5 (c+d x))+1365 i \sin (7 (c+d x))+99 i \sin (9 (c+d x))-24024 \cos (c+d x)-34320 \cos (3 (c+d x))+11440 \cos (5 (c+d x))+780 \cos (7 (c+d x))+44 \cos (9 (c+d x)))}{183040 a^4 d (\tan (c+d x)-i)^4} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^5/(a + I*a*Tan[c + d*x])^4,x]

[Out]

((-I/183040)*Sec[c + d*x]^4*(-24024*Cos[c + d*x] - 34320*Cos[3*(c + d*x)] + 11440*Cos[5*(c + d*x)] + 780*Cos[7
*(c + d*x)] + 44*Cos[9*(c + d*x)] - (6006*I)*Sin[c + d*x] - (25740*I)*Sin[3*(c + d*x)] + (14300*I)*Sin[5*(c +
d*x)] + (1365*I)*Sin[7*(c + d*x)] + (99*I)*Sin[9*(c + d*x)]))/(a^4*d*(-I + Tan[c + d*x])^4)

________________________________________________________________________________________

Maple [A]  time = 0.11, size = 306, normalized size = 1.8 \begin{align*} 2\,{\frac{1}{{a}^{4}d} \left ({\frac{{\frac{825\,i}{256}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{2}}}-{\frac{4\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{12}}}-{\frac{{\frac{1375\,i}{64}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{4}}}+{\frac{31\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{10}}}+{\frac{{\frac{i}{64}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{4}}}+{\frac{{\frac{465\,i}{8}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{6}}}+{\frac{8}{13\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{13}}}-{\frac{150}{11\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{11}}}+52\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-9}-{\frac{279}{4\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{7}}}+{\frac{6291}{160\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{5}}}-{\frac{1207}{128\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{3}}}+{\frac{233}{256\,\tan \left ( 1/2\,dx+c/2 \right ) -256\,i}}-{\frac{{\frac{11\,i}{256}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{2}}}-{\frac{{\frac{135\,i}{2}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{8}}}+{\frac{1}{160\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{5}}}-{\frac{5}{128\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{3}}}+{\frac{23}{256\,\tan \left ( 1/2\,dx+c/2 \right ) +256\,i}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^5/(a+I*a*tan(d*x+c))^4,x)

[Out]

2/d/a^4*(825/256*I/(tan(1/2*d*x+1/2*c)-I)^2-4*I/(tan(1/2*d*x+1/2*c)-I)^12-1375/64*I/(tan(1/2*d*x+1/2*c)-I)^4+3
1*I/(tan(1/2*d*x+1/2*c)-I)^10+1/64*I/(tan(1/2*d*x+1/2*c)+I)^4+465/8*I/(tan(1/2*d*x+1/2*c)-I)^6+8/13/(tan(1/2*d
*x+1/2*c)-I)^13-150/11/(tan(1/2*d*x+1/2*c)-I)^11+52/(tan(1/2*d*x+1/2*c)-I)^9-279/4/(tan(1/2*d*x+1/2*c)-I)^7+62
91/160/(tan(1/2*d*x+1/2*c)-I)^5-1207/128/(tan(1/2*d*x+1/2*c)-I)^3+233/256/(tan(1/2*d*x+1/2*c)-I)-11/256*I/(tan
(1/2*d*x+1/2*c)+I)^2-135/2*I/(tan(1/2*d*x+1/2*c)-I)^8+1/160/(tan(1/2*d*x+1/2*c)+I)^5-5/128/(tan(1/2*d*x+1/2*c)
+I)^3+23/256/(tan(1/2*d*x+1/2*c)+I))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5/(a+I*a*tan(d*x+c))^4,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 2.48283, size = 435, normalized size = 2.5 \begin{align*} \frac{{\left (-143 i \, e^{\left (18 i \, d x + 18 i \, c\right )} - 2145 i \, e^{\left (16 i \, d x + 16 i \, c\right )} - 25740 i \, e^{\left (14 i \, d x + 14 i \, c\right )} + 60060 i \, e^{\left (12 i \, d x + 12 i \, c\right )} + 30030 i \, e^{\left (10 i \, d x + 10 i \, c\right )} + 18018 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 8580 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 2860 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 585 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 55 i\right )} e^{\left (-13 i \, d x - 13 i \, c\right )}}{366080 \, a^{4} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5/(a+I*a*tan(d*x+c))^4,x, algorithm="fricas")

[Out]

1/366080*(-143*I*e^(18*I*d*x + 18*I*c) - 2145*I*e^(16*I*d*x + 16*I*c) - 25740*I*e^(14*I*d*x + 14*I*c) + 60060*
I*e^(12*I*d*x + 12*I*c) + 30030*I*e^(10*I*d*x + 10*I*c) + 18018*I*e^(8*I*d*x + 8*I*c) + 8580*I*e^(6*I*d*x + 6*
I*c) + 2860*I*e^(4*I*d*x + 4*I*c) + 585*I*e^(2*I*d*x + 2*I*c) + 55*I)*e^(-13*I*d*x - 13*I*c)/(a^4*d)

________________________________________________________________________________________

Sympy [A]  time = 2.60521, size = 369, normalized size = 2.12 \begin{align*} \begin{cases} \frac{\left (- 1688246017625898163896320 i a^{36} d^{9} e^{54 i c} e^{5 i d x} - 25323690264388472458444800 i a^{36} d^{9} e^{52 i c} e^{3 i d x} - 303884283172661669501337600 i a^{36} d^{9} e^{50 i c} e^{i d x} + 709063327402877228836454400 i a^{36} d^{9} e^{48 i c} e^{- i d x} + 354531663701438614418227200 i a^{36} d^{9} e^{46 i c} e^{- 3 i d x} + 212718998220863168650936320 i a^{36} d^{9} e^{44 i c} e^{- 5 i d x} + 101294761057553889833779200 i a^{36} d^{9} e^{42 i c} e^{- 7 i d x} + 33764920352517963277926400 i a^{36} d^{9} e^{40 i c} e^{- 9 i d x} + 6906460981196856125030400 i a^{36} d^{9} e^{38 i c} e^{- 11 i d x} + 649325391394576216883200 i a^{36} d^{9} e^{36 i c} e^{- 13 i d x}\right ) e^{- 49 i c}}{4321909805122299299574579200 a^{40} d^{10}} & \text{for}\: 4321909805122299299574579200 a^{40} d^{10} e^{49 i c} \neq 0 \\\frac{x \left (e^{18 i c} + 9 e^{16 i c} + 36 e^{14 i c} + 84 e^{12 i c} + 126 e^{10 i c} + 126 e^{8 i c} + 84 e^{6 i c} + 36 e^{4 i c} + 9 e^{2 i c} + 1\right ) e^{- 13 i c}}{512 a^{4}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**5/(a+I*a*tan(d*x+c))**4,x)

[Out]

Piecewise(((-1688246017625898163896320*I*a**36*d**9*exp(54*I*c)*exp(5*I*d*x) - 25323690264388472458444800*I*a*
*36*d**9*exp(52*I*c)*exp(3*I*d*x) - 303884283172661669501337600*I*a**36*d**9*exp(50*I*c)*exp(I*d*x) + 70906332
7402877228836454400*I*a**36*d**9*exp(48*I*c)*exp(-I*d*x) + 354531663701438614418227200*I*a**36*d**9*exp(46*I*c
)*exp(-3*I*d*x) + 212718998220863168650936320*I*a**36*d**9*exp(44*I*c)*exp(-5*I*d*x) + 10129476105755388983377
9200*I*a**36*d**9*exp(42*I*c)*exp(-7*I*d*x) + 33764920352517963277926400*I*a**36*d**9*exp(40*I*c)*exp(-9*I*d*x
) + 6906460981196856125030400*I*a**36*d**9*exp(38*I*c)*exp(-11*I*d*x) + 649325391394576216883200*I*a**36*d**9*
exp(36*I*c)*exp(-13*I*d*x))*exp(-49*I*c)/(4321909805122299299574579200*a**40*d**10), Ne(4321909805122299299574
579200*a**40*d**10*exp(49*I*c), 0)), (x*(exp(18*I*c) + 9*exp(16*I*c) + 36*exp(14*I*c) + 84*exp(12*I*c) + 126*e
xp(10*I*c) + 126*exp(8*I*c) + 84*exp(6*I*c) + 36*exp(4*I*c) + 9*exp(2*I*c) + 1)*exp(-13*I*c)/(512*a**4), True)
)

________________________________________________________________________________________

Giac [A]  time = 1.17725, size = 336, normalized size = 1.93 \begin{align*} \frac{\frac{143 \,{\left (115 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 405 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 575 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 375 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 98\right )}}{a^{4}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right )}^{5}} + \frac{166595 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{12} - 1409265 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{11} - 6232655 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{10} + 17535375 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{9} + 34610004 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{8} - 49771722 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{7} - 53349582 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{6} + 42730974 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 25431835 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 10954229 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 3278067 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 614627 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 60094}{a^{4}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}^{13}}}{91520 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5/(a+I*a*tan(d*x+c))^4,x, algorithm="giac")

[Out]

1/91520*(143*(115*tan(1/2*d*x + 1/2*c)^4 + 405*I*tan(1/2*d*x + 1/2*c)^3 - 575*tan(1/2*d*x + 1/2*c)^2 - 375*I*t
an(1/2*d*x + 1/2*c) + 98)/(a^4*(tan(1/2*d*x + 1/2*c) + I)^5) + (166595*tan(1/2*d*x + 1/2*c)^12 - 1409265*I*tan
(1/2*d*x + 1/2*c)^11 - 6232655*tan(1/2*d*x + 1/2*c)^10 + 17535375*I*tan(1/2*d*x + 1/2*c)^9 + 34610004*tan(1/2*
d*x + 1/2*c)^8 - 49771722*I*tan(1/2*d*x + 1/2*c)^7 - 53349582*tan(1/2*d*x + 1/2*c)^6 + 42730974*I*tan(1/2*d*x
+ 1/2*c)^5 + 25431835*tan(1/2*d*x + 1/2*c)^4 - 10954229*I*tan(1/2*d*x + 1/2*c)^3 - 3278067*tan(1/2*d*x + 1/2*c
)^2 + 614627*I*tan(1/2*d*x + 1/2*c) + 60094)/(a^4*(tan(1/2*d*x + 1/2*c) - I)^13))/d